Example: Display completed orders

This example uses the Query Menu iPart and the Link feature to display completed orders to users.

1.  In IQA, create a new query and name it Completed Orders.

2.  Mode: Advanced

3.  From the Sources tab, add CsOrderHistory and CsContact.

4.  From the Display tab, select the following properties to be displayed:

□    CsContact.Full Name

□    CsOrderHistory.Transaction Date

□    CsOrderHistory.Id

□    CsOrderHistory.Product Name

□    CsOrderHistory.Product Code

□    CsOrderHistory.Quantity

5.  Give the following properties an Alias prefaced with code_, so that the column value is hidden in the query results but can still be used as a reference in the Link.

□    CsOrderHistory.Id, Alias code_ID

□    CsOrderHistory.Product Code, Alias code_ProductCode

6.  For the CsContact.Full Name Display Property, enter the following Link:

□    ~MyAccount&ID=[code_ID]

Note: This Link assumes that you have a shortcut named MyAccount pointing to a content record containing Contact iParts that can use the ID URL parameter.

7.  For the CsOrderHistory.Product Name Display Property, enter the following for the Link:

□    ~/ItemDetail&iProductCode=[code_ProductCode]

Note: This Link assumes that you have a shortcut named ItemDetail pointing to a content record containing the General Product Display iPart.

8.  From the Sorting tab, select the CsOrderHistory.Transaction Date Property and sort Descending.

9.  Save the query.

10. From Content designer > Manage content, add the Query Menu iPart to a content record.

11. For the iPart’s Source query or folder, select the Completed Orders query.

12. Click OK, then Save and Publish your content record.

13. From Site designer > Manage sitemaps, add the content record to a navigation item.

When the query results are displayed in your website, the results in the Account and Product columns are linked to the pages you defined in your query.